<title>会员管理</title>
  
<div class="layui-card layadmin-header">
  <div class="layui-breadcrumb" lay-filter="breadcrumb">
    <a lay-href="">主页</a>
    <a><cite>提现记录</cite></a>
  </div>
</div>

<div class="layui-fluid">
  <script type="text/html" template lay-filter="LAY-cashtj-manage" lay-url="{{ layui.setter.baseUrl }}cash/tongji">
  <div class="layui-row layui-col-space15">
    {{# for(var idx in d.data){ }}
    <div class="layui-col-sm{{12/d.data.length}}">
      <div class="layui-card">
        <div class="layui-card-header">
          {{d.data[idx]['text1']}}
          {{# if(d.data[idx]['cash']){ }}<a href="javascript:;" class="layui-badge layui-bg-orange layuiadmin-badge" onclick="layui.cash({{d.data[idx]['type']}})">立即提现</a>{{# } }}
        </div>
        <div class="layui-card-body layuiadmin-card-list">

          <p class="layuiadmin-big-font">{{d.data[idx]['num1']}}</p>
          <p>
            {{d.data[idx]['text2']}}
            <span class="layuiadmin-span-color">{{d.data[idx]['num2']}}</span>
          </p>
        </div>
      </div>
    </div>
    {{# } }}
  </div>
  </script>
  <p><br></p>
  <div class="layui-card">
    <div class="layui-card-body">
      <table id="LAY-cash-manage" lay-filter="LAY-cash-manage"></table>
      <script type="text/html" id="imgTpl"> 
        <img style="display:inline-block;width:30px;height:30px" src= {{ d.avatar }} >
        {{ d.nickname }}
      </script> 
      <script type="text/html" id="timeTpl"> 
        {{# var date = new Date(d.createtime * 1000);
          var dt = date.getFullYear() + '-';
          dt += (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
          dt += (Array(2).join(0) + date.getDate()).slice(-2) + ' ';
          dt += (Array(2).join(0) + date.getHours()).slice(-2) + ':';
          dt += (Array(2).join(0) + date.getMinutes()).slice(-2) + ':';
          dt += (Array(2).join(0) + date.getSeconds()).slice(-2); }}
        {{ dt }}
      </script>
      <script type="text/html" id="typeTpl"> 
        {{# if(d.type==0){ }}
        <span class="layui-badge layui-bg-black">余额提现</span>
        {{# }else if(d.type==1){ }}
        <span class="layui-badge layui-bg-blue">结算提现</span>
        {{# } }}
      </script>
      <script type="text/html" id="statusTpl"> 
        {{# if(d.status==0){ }}
        <span class="layui-badge layui-bg-orange">提现中</span>
        {{# }else if(d.status==1){ }}
        <span class="layui-badge layui-bg-green">已提现</span>
        {{# }else if(d.status==2){ }}
        <span class="layui-badge">已驳回</span>
        {{# } }}
      </script>
    </div>
  </div>
</div>

<script>
layui.use('cash', layui.factory('cash')).use(['admin', 'cash', 'table'], function(){
  var $ = layui.$
  ,admin = layui.admin
  ,view = layui.view
  ,table = layui.table
  ,form = layui.form;
  
  form.render(null, 'layadmin-cashfront-formlist');

  layui.cash = function(type){
    layui.cashtype = type;
    admin.popup({
        title: "提现",
        area: [$(window).width()*0.618+'px', $(window).height()*0.9+'px'],
        id: "LAY-popup-cash-add",
        success: function(e, i) {
          view(this.id).render("cash/add");
        }
    });
  }

});
</script>